{% extends "base.html" %}
   {% block title %}
   {% if is_teacher %}
      Teacher's index
   {% else %}
      Student's index
   {% endif %}
   {% endblock %}
{% block content %}
   {% if is_teacher %}
      Welcome, {{ username.first_name }}!

      You can do the following: <br />
      <a href="/hwk/newclass">Add a new class</a><br />
      <a href="/hwk/addhwk">Add homework</a><br />
      <a href="/hwk/uploadlist">Check uploaded homework</a><br />
      <a href="/hwk/newnews">Add a new news item</a><br />
      <a href="/hwk/register">Add a new user</a><br />
   {% else %}
      Welcome, {{ username.first_name }}!<br />
      <a href="/hwk/all">See homework</a><br />
      <a href="/hwk/uploadlist">See homework you have uploaded</a><br />
   {% endif %}	
<br /><br />
<strong>News:</strong>
<ul>
<div class="description">
{% for news in news %}
	<li><a href="/hwk/news/{{ news.id }}"> {{ news.title }}</a> <em>{{ news.date }}</em></li>
{% endfor %}
</div>
</ul>
<a href="/hwk/logout">Logout</a>


{% endblock %}
